package com.iot08.api.service;

import com.iot08.api.vo.request.base.BaseAccountReqVO;
import com.iot08.common.entity.app.ActiveUser;
import com.iot08.common.service.base.BaseService;
import org.springframework.stereotype.Service;

/**
 * @version 1.0
 * @Description: 活跃用户数据处理
 * @time: 2020/12/21 18:03
 * @author: Rock
 */
@Service
public class ActiveUserService extends BaseService<ActiveUser> {


    /**
     * @param vo
     * @param version
     * @time: 2020/12/21 18:57
     * @author: Rock
     * @version 1.0
     */
    public void add(BaseAccountReqVO vo, String version) {
        ActiveUser activeUser = new ActiveUser();
        activeUser.setOpenid(vo.getOpenid());
        activeUser.setVersion(version);
        activeUser.setTime(System.currentTimeMillis());
        this.save(activeUser);
    }

}
